<?php

/**
 * SolicitudDetalle form base class.
 *
 * @package    form
 * @subpackage solicitud_detalle
 * @version    SVN: $Id: sfDoctrineFormGeneratedTemplate.php 8508 2008-04-17 17:39:15Z fabien $
 */
class BaseSolicitudDetalleForm extends BaseFormDoctrine
{
  public function setup()
  {
    $this->setWidgets(array(
      'id'           => new sfWidgetFormInputHidden(),
      'dia'          => new sfWidgetFormInput(),
      'dinero_dia'   => new sfWidgetFormInput(),
      'bs_ctes'      => new sfWidgetFormInput(),
      'con_anticipo' => new sfWidgetFormInput(),
      'anticipo'     => new sfWidgetFormInput(),
      'id_solicitud' => new sfWidgetFormDoctrineSelect(array('model' => 'Afiliado', 'add_empty' => false)),
      'id_afiliado'  => new sfWidgetFormDoctrineSelect(array('model' => 'Afiliado', 'add_empty' => false)),
    ));

    $this->setValidators(array(
      'id'           => new sfValidatorDoctrineChoice(array('model' => 'SolicitudDetalle', 'column' => 'id', 'required' => false)),
      'dia'          => new sfValidatorInteger(),
      'dinero_dia'   => new sfValidatorInteger(),
      'bs_ctes'      => new sfValidatorInteger(),
      'con_anticipo' => new sfValidatorString(array('max_length' => 5)),
      'anticipo'     => new sfValidatorInteger(),
      'id_solicitud' => new sfValidatorDoctrineChoice(array('model' => 'Afiliado')),
      'id_afiliado'  => new sfValidatorDoctrineChoice(array('model' => 'Afiliado')),
    ));

    $this->widgetSchema->setNameFormat('solicitud_detalle[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    parent::setup();
  }

  public function getModelName()
  {
    return 'SolicitudDetalle';
  }

}